﻿#ifndef UIDEVICEINFOCARD_H
#define UIDEVICEINFOCARD_H

#include <QWidget>
#include <QSharedPointer>
#include <QVBoxLayout>
#include <devicemodel/CRtDeviceInfo.h>
#include <model/device/uidevicecommparedid.h>

class UiDeviceInfoCard : public QWidget
{
    Q_OBJECT
public:
    explicit UiDeviceInfoCard(CRtDeviceInfo& info, QWidget *parent = nullptr);

    void uiInit();
    void reloadData();
    CRtDeviceInfo info();

public slots:
    void slotCfgEdit();

signals:

protected:
    void paintEvent(QPaintEvent *event) override;


private:
    class ElaText* lab_name;
    class ElaText* lab_descr;
    class ElaText* lab_modelname;
    class ElaText* lab_devicegroup;
    class ElaText* lab_location;
    class ElaText* lab_createtime;
    class ElaText* lab_protocol;
    class ElaText* lab_version;
    class ElaText* lab_accruedonlinetime;
    class ElaText* lab_valid;

    class QPushButton* btn_img;

    class QPushButton* btn_collector;
    class QPushButton* btn_run;
    class QPushButton* btn_cfg;
    class QPushButton* btn_debug;

    CRtDeviceInfo m_info;
};

#endif // UIDEVICEINFOCARD_H
